def divide(a, b):
    try:
        result = a / b
    except ZeroDivisionError as e:
        print(f"除零错误: {e}")
    except TypeError as e:
        print(f"类型错误: {e}")
    else:
        print("结果:", result)
    finally:
        print("无论是否发生异常都会执行此部分")

divide(10, 2)   # 正常情况
divide(10, 0)   # 触发ZeroDivisionError
divide('10', 2) # 触发TypeError